/**
 * @Date 2021-10-08 14:08:20
 * @Remark
 */

// API -------------------------------------------------------------

export const API_LOGIN: Api = {
  title: "注册登录",
  path: "appUser/mobileLogin",
  method: "POST",
  prefix: "app/li_dian",
  remark: "app用户",
};

// req
export interface ReqLogin {
  mobile: string;
  verificationCode: string;
  recommendUserMobile?: string;
}

// data
export interface DataLogin {
  token: string; // 有其他的数据,只用这个
}

// res
export interface ResLogin extends Res {
  // eslint-disable-next-line no-use-before-define
  data: DataLogin;
}

// API -------------------------------------------------------------

export const API_CODE: Api = {
  title: "发送手机验证码",
  path: "appUser/sendLoginCode",
  method: "POST",
  prefix: "app/li_dian",
  remark: "app用户",
};

// req
export interface ReqCode {
  mobile: string;
}

// res
export interface ResCode extends Res {
  data: {
    code: string | null;
  };
}
